package com.chenxin.quartz.task.sap;

import com.chenxin.interact.domain.UrlMap;
import com.chenxin.interact.service.IUrlMapService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component("bomRequestTask")
public class BomRequestTask {
    @Autowired
    private IUrlMapService urlMapService;

    public void bomRequest() {
        // 0.判断对用的URL是否在[wms_url_map]表中进行配置
        UrlMap bomUrl = urlMapService.selectUrlMapByUrlNo("SAP_BOM");
        if (bomUrl == null) {
            log.error("[SAP_BOM]未在表[wms_url_map]中进行配置!请核查");
            return;
        }
        // 1.调用SAP接口获取BOM接口
        log.info("获取BOM成功!");
    }
}
